<%@ page import="bugtracking.TechnicalSupportIssuesDM" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'technicalSupportIssuesDM.label', default: 'TechnicalSupportIssuesDM')}"/>
    <title><g:message code="default.list.label" args="[entityName]"/></title>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
        google.load('visualization', '1', {packages: ['corechart']});
    </script>
    <g:javascript type="text/javascript">
    function drawVisualization() {
    // Some raw data (not necessarily accurate)

    var data = google.visualization.arrayToDataTable(${i});

    // Create and draw the visualization.
    var comboChart = new google.visualization.ComboChart(document.getElementById('chart_div'));
    comboChart.draw(data, {
    title : 'SE Duration',
    vAxis: {title: "Duration(days)"},
    hAxis: {title: "Time"},
    seriesType: "line",
    series: {2: {type: "line"}}
    });
    }
    google.setOnLoadCallback(drawVisualization);


    </g:javascript>
</head>
<body>
<div class="nav">
    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
    <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]"/></g:link></span>
</div>
<div class="body">
    <h1><g:message code="default.list.label" args="[entityName]"/></h1>
    <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
    </g:if>
    <div class="list">
        <table>
            <thead>
            <tr>

                <g:sortableColumn property="id" title="${message(code: 'technicalSupportIssuesDM.id.label', default: 'Id')}"/>

                <g:sortableColumn property="bug_id" title="${message(code: 'technicalSupportIssuesDM.bug_id.label', default: 'Bugid')}"/>

                <g:sortableColumn property="bug_status" title="${message(code: 'technicalSupportIssuesDM.bug_status.label', default: 'Bugstatus')}"/>

                <g:sortableColumn property="closed_date" title="${message(code: 'technicalSupportIssuesDM.closed_date.label', default: 'Closeddate')}"/>

                <g:sortableColumn property="component" title="${message(code: 'technicalSupportIssuesDM.component.label', default: 'Component')}"/>

                <g:sortableColumn property="creation_ts" title="${message(code: 'technicalSupportIssuesDM.creation_ts.label', default: 'Creationts')}"/>

            </tr>
            </thead>
            <tbody>
            <g:each in="${technicalSupportIssuesDMInstanceList}" status="i" var="technicalSupportIssuesDMInstance">
                <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

                    <td><g:link action="show" id="${technicalSupportIssuesDMInstance.id}">${fieldValue(bean: technicalSupportIssuesDMInstance, field: "id")}</g:link></td>

                    <td>${fieldValue(bean: technicalSupportIssuesDMInstance, field: "bug_id")}</td>

                    <td>${fieldValue(bean: technicalSupportIssuesDMInstance, field: "bug_status")}</td>

                    <td><g:formatDate date="${technicalSupportIssuesDMInstance.closed_date}"/></td>

                    <td>${fieldValue(bean: technicalSupportIssuesDMInstance, field: "component")}</td>

                    <td><g:formatDate date="${technicalSupportIssuesDMInstance.creation_ts}"/></td>

                </tr>
            </g:each>
            </tbody>
        </table>
    </div>

    <div class="paginateButtons">
        <g:paginate total="${technicalSupportIssuesDMInstanceTotal}"/>
    </div>


    <div id="chart_div" style="width: 700px; height: 400px;"></div>
</div>
</body>
</html>
